<?php 
	$arcModel=new \Common\Model\Arc;
	$cateModel=new \Common\Model\Cate;
	$tagModel=new \Common\Model\Tag;
	//获取分类，并添加统计数量
	$cateData=$cateModel->get();
	foreach($cateData as $k=>$v){
		$cateData[$k]['total']=$arcModel
			->where("category_cid={$v['cid']}")
			->where('is_recycle=0')
			->count();
	}
	//获取标签
	$tagData=$tagModel->get();
	foreach($tagData as $k=>$v){
		$tagData[$k]['total']=$tagModel
			->join('article_tag','tid','=','tag_tid')
			->join('article','article_aid','=','aid')
			->where("tag_tid={$v['tid']}")
			->where('is_recycle=0')
			->count();
	}
 ?>
			<aside class="col-md-4 hidden-sm hidden-xs">
						<div class="_widget">
							<h4>碎言碎语</h4>
							<div class="_info">
								<p>{{C('webSet.WEB_TALK')}}</p>
								<img src=".	/Public/home/images/3.jpg" width="100%"/>
							</div>
						</div>
						<div class="_widget">
							<h4>分类列表</h4>
							<div>
								{{foreach from="$cateData" value="$v"}}
								<a href="c_{{$v['cid']}}.html">{{$v['cname']}} ({{$v['total']}})</a>
								{{endforeach}}
							</div>
						</div>
						<div class="_widget">
							<h4>标签云</h4>
							<div class="_tag">
								{{foreach from="$tagData" value="$t"}}
									<a href="t_{{$t['tid']}}.html"">{{$t['tname']}}({{$t['total']}})</a>
								{{endforeach}}
							</div>
						</div>
					</aside>
				</div>
			</div>